<template>
  <div class="control-item">
    <div class="control-header">
      <span class="control-name">模块分类</span>
      <span @click="showBeautyBox = true">组件美化</span>
    </div>
    <div class="control-body">
      <div class="control-section">
        <fontControl
          :fontData.sync="params.params.nameCss"
          controlName="选项卡文字"
          :showAlign="false"
          @resetFontCss="resetItem('nameCss')"
        ></fontControl>
        <!-- 文字颜色 -->
        <colorControl
          :color.sync="params.params.shopNameBgColor"
          title="选项卡背景"
          @reset="resetSingleTabColor"
          @change="setSingleTabColor"
        ></colorControl>
        <!-- 选项卡文字 -->
        <div class="control-item classify-list">
          <div class="control-title flex-between">
            <span>选项卡列表</span>
            <span class="reset" @click="resetItem('classifyList')">重置</span>
          </div>
          <div class="control-content">
            <div class="list-section">
              <div class="list-box" @dragover.prevent @drop="dropToPreview($event)">
                <div
                  class="list-item"
                  :class="currentClassifyIndex == index ? 'active' : ''"
                  v-for="(item, index) in params.params.classifyList"
                  :key="index"
                  v-dragging="{
                    item: item,
                    list: params.params.classifyList,
                    group: 'shopClassify',
                  }"
                  @click="handleClassifyListItem(item, index)"
                >
                  <div class="classify-name" @dblclick="dblclickIndex = index">
                    <a-input
                      v-if="dblclickIndex == index"
                      autoFocus
                      v-model="item.title"
                      @pressEnter="dblclickIndex = -1"
                      @blur="dblclickIndex = -1"
                    />
                    <a-tooltip v-else>
                      <template slot="title"> 双击修改文字 </template>
                      <span>{{ item.title }}</span>
                    </a-tooltip>
                  </div>
                  <div class="icons-box">
                    <div class="sort-icons">
                      <i class="iconfont icon-paixushang" @click="sortClassifyList('up', index)"></i>
                      <i class="iconfont icon-paixuxia" @click="sortClassifyList('down', index)"></i>
                    </div>
                    <i class="iconfont icon-mokuai-shanchu" @click="deleteClassifyItem(index)"></i>
                  </div>
                </div>
              </div>
              <div
                class="add-classify-title"
                :class="params.params.classifyList.length ? 'add-border-top' : ''"
                @click="addClassifyTitle"
              >
                <i class="iconfont icon-jiahao"></i>
                <span>添加选项卡</span>
              </div>
            </div>
          </div>
        </div>
        <!-- 选项卡标题 -->
        <div class="control-item classify-title" v-if="currentClassifyIndex > -1">
          <div class="control-title flex-between">
            <span>选项卡标题</span>
            <span class="reset" @click="resetClassifyTitle('title', '标题')">重置</span>
          </div>
          <div class="control-content">
            <div class="classify-title-input">
              <a-input v-model="currentClassifyItem.title" placeholder="请输入选项卡标题" />
            </div>
          </div>
        </div>
        <!-- 选择商品选择分类 -->
        <div class="control-item choose-product" v-if="currentClassifyIndex > -1">
          <div class="control-title flex-between">
            <span>选择商家选择分类</span>
            <span class="reset" @click="resetProductData">重置</span>
          </div>
          <div class="control-content">
            <!-- 选择tab -->
            <div class="data-tabs">
              <div
                class="tab-bg"
                :class="currentClassifyItem.dataFrom == 'classify' ? 'active-classify' : 'active-select'"
              ></div>
              <div class="tab-content">
                <div class="tab-item" @click="handleDataTab('select')">手动选择</div>
                <div class="tab-item" @click="handleDataTab('classify')">选择分类</div>
              </div>
            </div>
            <!-- 分类选择 -->
            <div v-if="currentClassifyItem.dataFrom == 'classify'" class="select-classify">
              <a-select
                v-model="currentClassifyItem.classifyId"
                style="width: 100%"
                @change="chooseCat"
                placeholder="选择分类"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
              >
                <a-select-option :value="item.id" v-for="item in catList" :key="item.id"> {{item.name}} </a-select-option>
              </a-select>
            </div>
            <!-- 手动选择的商品 -->
            <section v-else class="select-data-section">
              <div class="select-list" @dragover.prevent @drop="dropToPreview($event)" v-if="currentClassifyItem.data">
                <div
                  class="list-item"
                  v-for="(item, index) in currentClassifyItem.data"
                  :key="index"
                  v-dragging="{
                    item: item,
                    list: currentClassifyItem.data,
                    group: 'shopClassifySelect',
                  }"
                >
                  <img class="pic-img" :src="item.logo" alt="" />
                  <p class="name">{{ item.name }}</p>
                  <p class="action">
                    <i
                      class="iconfont icon-paixushang"
                      :class="index == 0 ? 'disabled' : ''"
                      @click="sortToUp(item, index)"
                    ></i>
                    <i
                      class="iconfont icon-paixuxia"
                      @click="sortToDown(item, index)"
                      :class="index + 1 == currentClassifyItem.data.length ? 'disabled' : ''"
                    ></i>
                  </p>
                  <p class="delete" @click="deleteProcuct(item, index)">
                    <i class="iconfont icon-mokuai-shanchu"></i>
                  </p>
                </div>
              </div>
              <div class="select-data" @click="showShops = !showShops">
                <i class="iconfont icon-jiahao"></i>
                <span>添加商户</span>
              </div>
            </section>
          </div>
        </div>
      </div>
    </div>

    <!-- 组件美化 -->
    <comBeautyBox :showBeautyBox="showBeautyBox" @handleBack="showBeautyBox = false">
      <div>
        <!-- 背景配置 -->
        <bgControl :backgroudData="params.params.classBgCss"></bgControl>
        <!-- 间距控制组件 -->
        <spaceControl
          :spaceData.sync="params.params.classBgCss"
          @resetSpace="resetSpace"
          @resetMp="resetMp"
        ></spaceControl>
        <!-- 商品外间距 -->
        <div class="color-control-item product-space add-top-border">
          <div
            class="color-control-head"
            @click.stop="shopNameSpace = !shopNameSpace"
            :class="!shopNameSpace ? 'no-padding-bottom' : ''"
          >
            <p>选项卡间距</p>
            <div class="head-icons">
              <i class="iconfont icon-xianshi"></i>
              <i v-if="!shopNameSpace" @click.stop="shopNameSpace = !shopNameSpace" class="iconfont icon-jiahao"></i>
              <i v-else @click.stop="shopNameSpace = !shopNameSpace" class="iconfont icon-jian"></i>
            </div>
          </div>
          <div class="control-content space-set" v-if="shopNameSpace">
            <div class="space-set-body">
              <i class="iconfont icon-mokuaibianju-xiabianju"></i>
              <a-slider class="slider" v-model="params.params.shopNameSpace" :min="0" :max="20" />
              <div @mouseenter="showBoxOutSet = !showBoxOutSet" @mouseleave="showBoxOutSet = !showBoxOutSet">
                <a-input-number
                  v-show="showBoxOutSet"
                  class="slider-input"
                  :min="0"
                  :max="50"
                  v-model="params.params.shopNameSpace"
                />
                <span class="borderNumSpan" v-show="!showBoxOutSet">{{ params.params.shopNameSpace || 0 }}</span>
                <span>px</span>
              </div>
            </div>
          </div>
        </div>
      </div>
    </comBeautyBox>
    <searchShops v-if="showShops" v-model="showShops" @onOk="searchShopsCb"></searchShops>
  </div>
</template>

<script>
import fontControl from '@/components/DiyNew/diy/baseControl/fontControl/index.vue'
import colorControl from '@/components/DiyNew/diy/baseControl/colorControl/index.vue'
import searchShops from '@/components/DiyNew/searchShops/index.vue'
import { list, shopCats } from '@/api/diy/goods/shops'
import { nearShop } from '@/components/DiyNew/diy/dataConfig/config.js'
import bgControl from '@/components/DiyNew/diy/baseControl/bgControl/index.vue'
import comBeautyBox from '@/components/DiyNew/diy/comBeautyBox/comBeautyBox.vue'
import spaceControl from '@/components/DiyNew/diy/baseControl/spaceControl/index.vue'

export default {
  name: 'shopClassifyControl',
  components: {
    bgControl,
    comBeautyBox,
    spaceControl,
    fontControl,
    colorControl,
    searchShops,
  },
  props: {
    params: {
      type: Object,
      default: {},
    },
  },
  data() {
    return {
      showBeautyBox: false,
      currentClassifyItem: {},
      currentClassifyIndex: -1,
      // 双击修改文字的index
      dblclickIndex: -1,
      // 是否显示选项卡间距控制
      shopNameSpace: false,
      showBoxOutSet: false,
      // 是否显示选择商户
      showShops: false,
      // 店铺分类
      catList: [],
    }
  },
  watch: {},
  computed: {
    styleType: {
      get() {
        return this.params.params.styleType || '1'
      },
    },
  },
  mounted() {
    this.getShopCat()
    this.$eventHub.$on('shopClassifyTabChange', (e) => {
      if (!this.params.params.classifyList.length) return
      console.log('监听到了啥', e)
      this.handleClassifyListItem(e.item, e.index)
    })
    this.currentClassifyIndex = 0
    this.currentClassifyItem = this.params.params.classifyList[this.currentClassifyIndex]
  },
  methods: {
    // 点击重置按钮
    resetItem(type) {
      let data = JSON.parse(JSON.stringify(nearShop))
      console.log(data)
      this.$set(this.params.params, type, data.params[type])
    },
    // 重置圆角
    resetSpace(e) {
      let type = e.type
      console.log(type)
      this.$set(this.params.moduleCss, type, 0)
    },
    // 重置边距
    resetMp() {
      this.$set(this.params.moduleCss, 'margin', 0)
      this.$set(this.params.moduleCss, 'padding', 0)
    },
    dropToPreview(e) {
      console.log('拖拽完，扔我这=====', e)
    },
    // 点击选项卡某一项
    handleClassifyListItem(item, index) {
      this.currentClassifyItem = item
      this.currentClassifyIndex = index
    },
    // 点击排序选项卡
    sortClassifyList(type, index) {
      if (index == 0 && type == 'up') return
      if (index == this.params.params.classifyList.length - 1 && type == 'down') return
      let arr = this.params.params.classifyList
      let flag = type == 'up' ? index - 1 : index + 1
      arr[index] = arr.splice(flag, 1, arr[index])[0]
    },
    // 删除选项卡
    deleteClassifyItem(index) {
      this.params.params.classifyList.splice(index, 1)
    },
    // 点击添加选项卡
    addClassifyTitle() {
      let arr = this.params.params.classifyList
      arr.push({
        title: '标题',
        data: null,
        dataFrom: 'select',
        classifyId: '',
      })
      this.$set(this.params.params, 'classifyList', arr)
    },
    // 重置选项卡标题
    resetClassifyTitle(key, defalutVal) {
      this.resetClassifyItem(key, defalutVal)
    },
    // 重置选项数据
    resetClassifyItem(type, defaultData) {
      this.params.params.classifyList.forEach((d, index) => {
        if (index == this.currentClassifyIndex) {
          d[type] = defaultData
        }
      })
    },
    // 重置选项数据
    resetProductData() {
      this.params.params.classifyList.forEach((d, index) => {
        if (index == this.currentClassifyIndex) {
          d.data = null
          d.dataFrom = 'select'
          d.classifyId = ''
        }
      })
    },
    // 点击选择商品tab
    handleDataTab(type) {
      if (this.currentClassifyIndex < 0) return
      this.params.params.classifyList.forEach((d, index) => {
        if (index == this.currentClassifyIndex) {
          if (d.dataFrom) {
            if (d.dataFrom == 'select' && type == 'classify') {
              d.data = []
            }
            if (d.dataFrom == 'classify' && type == 'select') {
              d.classifyId = ''
              d.data = []
            }
            d.dataFrom = type
          } else {
            d.dataFrom = type
          }
        }
      })
      this.currentClassifyItem = this.params.params.classifyList[this.currentClassifyIndex]
    },
    // 根据分类id查商户数据
    chooseCat(e) {
      console.log(e)
      if (!e) return
      list({ categoryId:e }).then((res) => {
        if (res.code == 0) {
          let data = res.data.data
          this.params.params.classifyList.forEach((d, index) => {
            if (index == this.currentClassifyIndex) {
              d.data = data
            }
          })
        }
      })
    },
    // 商户排序上移
    sortToUp(item, index) {
      if (index == 0) return
      let arr = this.currentClassifyItem.data
      arr[index] = arr.splice(index - 1, 1, arr[index])[0]
    },
    // 商户排序下移
    sortToDown(item, index) {
      if (index == this.currentClassifyItem.data.length - 1) return
      let arr = this.currentClassifyItem.data
      arr[index] = arr.splice(index + 1, 1, arr[index])[0]
    },
    // 删除商户
    deleteProcuct(item, index) {
      this.currentClassifyItem.data.splice(index, 1)
    },
    // 重置选项卡背景颜色
    resetSingleTabColor(e) {
      let data = Object.assign({}, nearShop)
      this.$set(this.params.params, 'shopNameBgColor', data.params.shopNameBgColor)
    },
    // 设置选项卡背景颜色
    setSubtitleTabColor(e) {
      this.$set(this.params.params, 'shopNameBgColor', e)
    },
    // 选择商品回调
    searchShopsCb(e) {
      this.params.params.classifyList.forEach((d, index) => {
        if (index == this.currentClassifyIndex) {
          if (d.data) {
            d.data = [...d.data, ...e]
          } else {
            d.data = e
          }
        }
      })
      this.currentClassifyItem = this.params.params.classifyList[this.currentClassifyIndex]
      console.log(this.currentClassifyItem)
    },
    // 获取店铺分类
    async getShopCat() {
      const res = await shopCats()
      if (res.code == 0) {
        this.catList = res.data
      }
    },
  },
}
</script>

<style lang="scss" scoped>
.control-item {
  width: 100%;
  height: 100%;
  margin: 0 auto;
  .control-header {
    width: 100%;
    height: 48px;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px 14px 24px;
    position: absolute;
    top: 0;
    right: 0;
    span {
      font-size: 12px;
      color: #8c8c8c;
    }
    .control-name {
      font-size: 14px;
      font-weight: 600;
      color: #000000;
    }
    span:nth-child(2) {
      cursor: pointer;
    }
  }
  .control-body {
    width: 100%;
    padding-top: 48px;
    padding-bottom: 60px;
    .control-section {
      width: 228px;
      margin: 0 auto;
      text-align: center;
      .control-item {
        width: 100%;
        .control-title {
          padding: 24px 0 14px 0;
          font-size: 12px;
          color: #000000;
          text-align: left;
        }
        .control-content {
          .border-select {
            width: 98%;
            height: 100%;
            ::v-deep .ant-select-selection--single {
              height: 100%;
              border: 0 none;
              background: #f2f2f2;
            }
            ::v-deep .ant-select-selection__rendered {
              line-height: 40px;
            }
          }
          .example-list {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            .example-item {
              width: 70px;
              height: 70px;
              background: #f6f7f9;
              border-radius: 4px;
              margin-right: 9px;
              display: flex;
              justify-content: center;
              align-items: center;
              cursor: pointer;
              overflow: hidden;
              .iconfont {
                font-size: 60px;
              }
            }
            .example-item:last-child {
              margin-right: 0;
            }
            .active {
              border: 2px solid #1890fc;
            }
          }
          .goods-example-list {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            .example-item {
              width: 70px;
              height: 70px;
              background: #f6f7f9;
              border-radius: 4px;
              margin-right: 6px;
              margin-bottom: 8px;
              display: flex;
              justify-content: center;
              align-items: center;
              cursor: pointer;
              overflow: hidden;
              .iconfont {
                font-size: 60px;
              }
            }
            .example-item:last-child {
              margin-right: 0;
            }
            .active {
              border: 2px solid #1890fc;
            }
          }
          .buy-style-list {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            .buy-item {
              width: 70px;
              height: 70px;
              background: #f6f7f9;
              border-radius: 4px;
              display: flex;
              justify-content: center;
              align-items: center;
              margin-right: 8px;
              cursor: pointer;
              overflow: hidden;
              .icon-zidingyi {
                font-size: 60px;
              }
              .add-box {
                width: 24px;
                height: 24px;
                // background: #444444;
                border-radius: 8px;
                display: flex;
                justify-content: center;
                align-items: center;
                .iconfont {
                  font-size: 60px;
                }
              }
              .word-box {
                width: 100%;
                height: 100%;
                // background: #444444;
                border-radius: 60px;
                position: relative;
                display: flex;
                justify-content: center;
                align-items: center;
                .iconfont {
                  font-size: 60px;
                }
              }
            }
            .buy-item:last-child {
              margin-right: 0;
            }
            .active {
              border: 2px solid #1890fc;
            }
          }
        }
        .buyBtnText {
          width: 226px;
          height: 40px;
          border-radius: 4px;
          ::v-deep .ant-input {
            width: 100%;
            height: 100%;
            border: 0 none;
            background: #f6f7f9;
          }
        }
      }

      .content-show {
        .flex-between {
          display: flex;
          justify-content: space-between;
          .reset {
            font-size: 12px;
            color: #9e9e9e;
            cursor: pointer;
          }
        }
        .control-content {
          .switch-item {
            width: 228px;
            height: 40px;
            background: #f6f7f9;
            border-radius: 4px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 14px;
            margin-bottom: 8px;
          }
          .switch-item:last-child {
            margin-bottom: 0;
          }
        }
      }

      .classify-list {
        .control-content {
          .list-section {
            width: 228px;
            border: 2px solid #f6f7f9;
            border-radius: 4px;
            .list-box {
              width: 100%;
              max-height: 240px;
              background: #ffffff;
              overflow-x: hidden;
              overflow-y: scroll;
              .list-item {
                width: 100%;
                display: flex;
                height: 40px;
                justify-content: space-between;
                align-items: center;
                padding: 0 14px;
                .classify-name {
                  flex: 1;
                  text-align: left;
                }
                .icons-box {
                  display: flex;
                  align-items: center;
                  .sort-icons {
                    width: 24px;
                    height: 24px;
                    position: relative;
                    margin-right: 10px;
                    .icon-paixushang {
                      position: absolute;
                      left: -2px;
                      top: 0;
                    }
                    .icon-paixushang:hover {
                      color: #1890fc;
                    }
                    .icon-paixuxia {
                      position: absolute;
                      right: -2px;
                      top: 0;
                    }
                    .icon-paixuxia:hover {
                      color: #1890fc;
                    }
                  }
                  .iconfont {
                    cursor: pointer;
                  }
                  .icon-mokuai-shanchu:hover {
                    color: #1890fc;
                  }
                }
              }
              .active {
                background: #eaf5ff;
                border: 1px solid #1890fc;
              }
            }
            .list-box::-webkit-scrollbar {
              width: 0;
            }
            .add-classify-title {
              width: 100%;
              height: 40px;
              background: #ffffff;
              border-radius: 4px;
              display: flex;
              align-items: center;
              justify-content: center;
              cursor: pointer;
              .iconfont {
                font-size: 19px;
                color: #1890fc;
              }
              span {
                font-size: 14px;
                font-family: PingFang SC;
                font-weight: 600;
                color: #1890fc;
                margin-left: 4px;
              }
            }
            .add-border-top {
              border-top: 2px solid #f6f7f9;
            }
          }
        }
      }

      .flex-between {
        display: flex;
        justify-content: space-between;
        .reset {
          font-size: 12px;
          color: #9e9e9e;
          cursor: pointer;
        }
      }

      .classify-title {
        .control-content {
          .classify-title-input {
            width: 228px;
            height: 40px;
            background: #f6f7f9;
            border-radius: 4px;
            ::v-deep .ant-input {
              width: 100%;
              height: 40px;
              background: #f6f7f9;
              border: 0 none;
            }
          }
        }
      }

      .choose-product {
        .flex-between {
          display: flex;
          justify-content: space-between;
          .reset {
            font-size: 12px;
            color: #9e9e9e;
            cursor: pointer;
          }
        }
        .control-content {
          .data-tabs {
            width: 228px;
            height: 34px;
            background: #f6f7f9;
            border-radius: 4px;
            position: relative;
            .tab-bg {
              width: 113px;
              height: 30px;
              background: #ffffff;
              opacity: 1;
              border-radius: 4px;
              position: absolute;
              left: 2px;
              top: 2px;
              z-index: 11;
              transition: all 0.2s;
            }
            .active-select {
              left: 2px;
            }
            .active-classify {
              left: 113px;
            }
            .tab-content {
              width: 100%;
              height: 100%;
              position: absolute;
              left: 0;
              top: 0;
              z-index: 12;
              display: flex;
              justify-content: center;
              align-items: center;
              .tab-item {
                flex: 1;
                display: flex;
                justify-content: center;
                align-items: center;
                font-size: 14px;
                font-weight: 400;
                color: #000000;
                opacity: 0.45;
                transition: all 0.2s;
                cursor: pointer;
                user-select: none;
              }
            }
          }
          .select-data-section {
            margin-top: 8px;
          }
          .select-data {
            width: 228px;
            height: 40px;
            background: #f6f7f9;
            border-radius: 4px;
            padding: 0 14px;
            display: flex;
            align-items: center;
            cursor: pointer;
            .iconfont {
              font-size: 18px;
            }
            span {
              font-size: 14px;
              font-family: PingFang SC;
              font-weight: 400;
              color: #000000;
              margin-left: 8px;
            }
          }
          .select-data:hover {
            color: #1890fc;
            span {
              color: #1890fc;
            }
          }
          .select-list {
            width: 224px;
            background: #ffffff;
            border: 2px solid #f6f7f9;
            max-height: 320px;
            overflow: auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            box-sizing: content-box;
            .list-item {
              display: flex;
              align-items: center;
              padding: 0 14px;
              width: 100%;
              height: 64px;
              flex-shrink: 0;
              overflow: hidden;
              .pic-img {
                width: 44px;
                height: 44px;
                background: #ffffff;
                border-radius: 4px;
                margin-right: 6px;
                flex-shrink: 0;
              }
              .name {
                width: 98px;
                height: 20px;
                font-size: 12px;
                font-family: PingFang SC;
                font-weight: 400;
                color: #000000;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
                margin-right: 10px;
                margin-bottom: 0;
              }
              .action {
                margin-bottom: 0;
                position: relative;
                width: 20px;
                height: 24px;
                .iconfont {
                  position: absolute;
                  top: 0;
                }
                .iconfont:nth-child(1) {
                  left: -4px;
                }
                .iconfont:nth-child(1):hover {
                  color: #1890fc;
                }
                .iconfont:nth-child(2) {
                  right: -4px;
                }
                .iconfont:nth-child(2):hover {
                  color: #1890fc;
                }
                .disabled {
                  color: #a6a6a6 !important;
                }
              }
              .delete {
                font-size: 12px;
                margin-bottom: 0;
                margin-left: 10px;
              }
              .delete:hover {
                color: #1890fc;
              }
            }
            .list-item:hover {
              background: #eaf5ff;
              // border: 1px solid #1890fc;
            }
          }
          .select-classify {
            width: 228px;
            height: 40px;
            background: #f6f7f9;
            border-radius: 4px;
            margin-top: 8px;
            ::v-deep .ant-select-selection {
              height: 40px;
              border: 0 none;
              background: #f6f7f9;
            }
            ::v-deep .ant-select-selection__rendered {
              line-height: 40px;
            }
          }
        }
      }
    }
  }
  .color-control-item {
    width: 100%;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f2f5;
    .color-control-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 12px;
      font-weight: 400;
      color: #000000;
      padding: 24px 0 12px 0;
      p {
        margin-bottom: 0;
      }
      .head-icons {
        .iconfont:nth-child(1) {
          margin-right: 5px;
        }
      }
    }
    .no-padding-bottom {
      padding-bottom: 0;
    }
  }
  .add-top-border {
    border-top: 1px solid #f0f2f5;
  }

  .product-space {
    .control-title {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 24px 0 14px 0;
      font-size: 12px;
      color: #000000;
      text-align: left;
      .reset {
        font-size: 12px;
        color: #9e9e9e;
        cursor: pointer;
      }
    }
    .space-set {
      .space-set-body {
        width: 100%;
        height: 40px;
        background: #f6f7f9;
        border-radius: 4px;
        display: flex;
        align-items: center;
        padding-left: 14px;
        .iconfont {
          font-size: 20px;
        }
        .slider {
          margin: 0 16px;
          width: 100px;
          ::v-deep .ant-slider-track {
            background-color: #1890fc;
          }
          ::v-deep .ant-slider-rail {
            background-color: #e6e6e6;
          }
        }
        .slider-input {
          width: 30px;
          font-size: 12px;
          background-color: #f6f7f9;
          ::v-deep .ant-input-number-input {
            padding: 0;
            padding-right: 5px;
            text-align: right;
          }
        }
        span {
          font-size: 12px;
          color: #000000;
        }
        .borderNumSpan {
          width: 30px;
          display: inline-block;
          text-align: right;
          padding-right: 5px;
          border: 1px solid #f6f7f9;
        }
        ::v-deep .ant-input-number-handler-wrap {
          display: none;
        }
      }
      .space-set-body:last-child {
        margin-top: 12px;
      }
    }
  }
}
</style>
